<div class="row">
	<div class="col-md-12">
		<h1>Người dùng <small>Cập nhật</small></h1>
		<ol class="breadcrumb">
            <li><a href="<?php echo admin_page_url(); ?>"><i class="fa fa-dashboard"></i> Dashboard</a></li>
            <li><a href="<?php echo admin_page_url(USER_SLUG); ?>"><i class="fa fa-dashboard"></i> Người dùng</a></li>
            <li class="active"><i class="fa fa-table"></i> Cập nhật</li>
        </ol>
    </div>
    <div class="clearfix"></div>
</div>

<form role="form" method="post" action="<?php echo admin_page_url(USER_SLUG . '/cap-nhat/do'); ?>">
    <div class="form-group col-md-4 col-xs-12">
        <label for="username">Tên đăng nhập:</label>
        <input type="text" class="form-control" disabled="disabled" value="<?php echo $user->getUsername(); ?>" />
    </div>

    <div class="form-group col-md-4 col-xs-12">
        <label for="email">Email:</label>
        <input type="email" class="form-control" disabled="disabled" value="<?php echo $user->getEmail(); ?>" />
    </div>
    <div class="clearfix"></div>

    <div class="col-md-4 col-xs-12 checkbox inline-table">
        <p><strong>Tình trạng hoạt động:</strong></p>
        <input id="chk-active" class="input-user-active-flg lb-toggle" type="checkbox" <?php echo $user->getActiveFlg()==1?"checked='checked'":""; ?> name="u[active_flg]" value="1" />
        <label for="chk-active"></label>
    </div>
    <div class="clearfix"></div>

    <div class="col-md-4 col-xs-12">
        <div class="form-group">
            <label for="username"><span class="text-danger">*</span> Họ tên:</label>
            <input type="text" class="form-control" name="u[full_name]" value="<?php echo $user->getFullName(); ?>" />
        </div>
        <div class="form-group">
            <label for="username">Ngày sinh:</label>
            <input type="text" class="form-control input-date" name="u[birthday]" value="<?php echo $user->getBirthday(); ?>" />
        </div>
        <div class="form-group">
            <label for="username">Giới tính:</label>
            <select class="form-control" name="u[gender]">
                <option value="1" <?php echo $user->getGender()==GENDER_MALE?"selected='selected'":""; ?>>Nam</option>
                <option value="0" <?php echo $user->getGender()==GENDER_FEMALE?"selected='selected'":""; ?>>Nữ</option>
            </select>
        </div>
    </div>
    <div class="col-md-4 col-xs-12">
        <div class="form-group">
            <label for="username"><span class="text-danger">*</span> Địa chỉ:</label>
            <textarea class="form-control" name="u[address]" rows="4"><?php echo $user->getAddress(); ?></textarea>
        </div>
        <div class="form-group">
            <label for="username"><span class="text-danger">*</span> Số điện thoại:</label>
            <input type="text" class="form-control" name="u[phone]" value="<?php echo $user->getPhone(); ?>" />
        </div>
    </div>
    <div class="clearfix"></div>

    <div class="form-group col-md-4 col-xs-12 mgt10">
        <input type="hidden" name="u[id]" value="<?php echo $this->encrypt->encode($user->getId()); ?>" />
        <button type="button" class="btn btn-primary" id="btn-add-user"><i class="glyphicon glyphicon-ok-sign"></i> Cập nhật</button>
        <a class="btn btn-default" href="<?php echo admin_page_url(USER_SLUG); ?>">
            <i class="glyphicon glyphicon-repeat"></i> Trở về
        </a>
    </div>
</form>